home *** CD-ROM | disk | FTP | other *** search
- /* Copyright, 1990, Regents of the University of Colorado */
- /* This program prints out messages from two composite procedures which are
- * called in parallel, inside of two different one dimensional environment
- * structures. */
-
- #define P1 8
- #define P2 6
-
- environment node1[P1:id] {
-
- composite part1()
- {
- printf ("node1[%d] says hello from part1()#\n", id);
- }
-
- }
-
- environment node2[P2:id] {
-
- composite part2()
- {
- printf ("node2[%d] says hello from part2()#\n", id);
- }
-
- }
-
- environment host {
-
- void main ()
- {
- printf ("host says hello\n");
-
- part1()# :: part2()#; /* ==> Part1()# and part2()# run in parallel,
- through the use of the "::" operator.
- These two composite procedures must be
- in different environments in order for
- the parallelism to work. */
-
- printf ("host says goodby\n");
- }
- }
-